class LocalCache {
  setCache(name: string, value: any) {
    value = JSON.stringify(value)
    localStorage.setItem(name,value)
  }
  getCache(name: string) {
    const value = localStorage.getItem(name)
    
    if (value) {
      return JSON.parse(value)
    } 
  }
  removeCache(name: string) {
    localStorage.removeItem(name)
  }
}
export default new LocalCache()